home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / grafica / amhelios / prog_rad.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  3KB  |  92 lines

  1. ////////////////////////////////////////////////////////////
  2. //
  3. //  PROG_RAD.CPP - Progressive Refinement Radiosity Class
  4. //                 Include File
  5. //
  6. //  Version:    1.03A
  7. //
  8. //  History:    94/08/23 - Version 1.00A release.
  9. //              94/11/26 - Added Interpolate function
  10. //                         prototype.
  11. //              94/12/16 - Version 1.01A release.
  12. //              95/02/05 - Version 1.02A release.
  13. //              95/07/21 - Version 1.02B release.
  14. //              96/02/14 - Version 1.02C release.
  15. //              96/04/01 - Version 1.03A release.
  16. //
  17. //  Compilers:  Microsoft Visual C/C++ Professional V1.5
  18. //              Borland C++ Version 4.5
  19. //
  20. //  Author:     Ian Ashdown, P.Eng.
  21. //              byHeart Software Limited
  22. //              620 Ballantree Road
  23. //              West Vancouver, B.C.
  24. //              Canada V7S 1W3
  25. //              Tel. (604) 922-6148
  26. //              Fax. (604) 987-7621
  27. //
  28. //  Copyright 1994-1996 byHeart Software Limited
  29. //
  30. //  The following source code has been derived from:
  31. //
  32. //    Ashdown, I. 1994. Radiosity: A Programmer's
  33. //    Perspective. New York, NY: John Wiley & Sons.
  34. //
  35. //  It may be freely copied, redistributed, and/or modified
  36. //  for personal use ONLY, as long as the copyright notice
  37. //  is included with all source code files.
  38. //
  39. ////////////////////////////////////////////////////////////
  40.  
  41. #ifndef _PROG_RAD_H
  42. #define _PROG_RAD_H
  43.  
  44. #include "environ.h"
  45. #include "rad_eqn.h"
  46.  
  47. // NOTE: Either _HEMI_CUBE or _CUBIC_TETRA must be defined
  48. //       in order to specify the appropriate form factor
  49. //       determination class for FormFactor. This will
  50. //       typically be done from the command line or through
  51. //       the integrated development environment (IDE).
  52.  
  53. #if defined(_HEMI_CUBE)
  54. #include "hemicube.h"
  55. #elif defined(_CUBIC_TETRA)
  56. #include "cubic_t.h"
  57. #else
  58. #error Either _HEMI_CUBE or _CUBIC_TETRA must be defined
  59. #endif
  60.  
  61. // Progressive refinement radiosity equation solver
  62. class ProgRad : public RadEqnSolve
  63. {
  64.   protected:
  65.     float *ff_array;        // Form factor array pointer
  66.     BOOL over_flag;         // Overshoot flag
  67.     BOOL status;            // Object status
  68.     FormFactor ffd;         // Form factor determination
  69.     Spectra overshoot;      // Overshooting parameters
  70.  
  71.     void AddAmbient();
  72.     void CalcOverShoot();
  73.  
  74.   public:
  75.     ProgRad() : RadEqnSolve() { over_flag = TRUE; }
  76.  
  77.     ~ProgRad() { Close(); }
  78.  
  79.     BOOL Calculate();
  80.     BOOL OverShootFlag() { return over_flag; }
  81.     BOOL GetStatus() { return ffd.GetStatus(); }
  82.     BOOL Open( Environ * );
  83.     void Close();
  84.     void Snapshot();
  85.     void DisableOverShoot() { over_flag = FALSE; }
  86.     void EnableOverShoot() { over_flag = TRUE; }
  87.     void Interpolate();
  88. };
  89.  
  90. #endif
  91.  
  92.